-
-
Notifications
You must be signed in to change notification settings - Fork 26.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix formatWebpackMessages to return all formatted messages instead of just one error. #2834
Conversation
Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need the corporate CLA signed. If you have received this in error or have any questions, please contact us at cla@fb.com. Thanks! |
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks! |
Great, nice catch! |
Actually, I think we need to change this in webpackHotDevClient too, could you please do that? |
Sure I can do that, I'm currently in vacation so I'll do that as soon as I get back
Obtenez Outlook pour iOS<https://aka.ms/o0ukef>
…________________________________
From: Joe Haddad <notifications@github.com>
Sent: Wednesday, August 2, 2017 3:15:01 AM
To: facebookincubator/create-react-app
Cc: Stéphane Goetz; Author
Subject: Re: [facebookincubator/create-react-app] fix formatWebpackMessages to return all formatted messages instead of just one error. (#2834)
Actually, I think we need to change this in webpackHotDevClient<https://github.com/facebookincubator/create-react-app/blob/master/packages/react-dev-utils/webpackHotDevClient.js> too, could you please do that?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub<#2834 (comment)>, or mute the thread<https://github.com/notifications/unsubscribe-auth/AAS5WgXj1Lx4ihuUlzSnPRwtJt-1oC1Iks5sT82VgaJpZM4Of1eS>.
|
Okay, I looked into it, and webpackHotDevClient doesn't need any change : The first usage of And while the second call (https://github.com/facebookincubator/create-react-app/blob/master/packages/react-dev-utils/webpackHotDevClient.js#L268) is for errors, it already only takes the first error (https://github.com/facebookincubator/create-react-app/blob/master/packages/react-dev-utils/webpackHotDevClient.js#L274) And then it wants to log the rest of errors, that's probably where you want to keep all of them as well. |
Fantastic, thanks! |
Hi there! This change is out in |
* Move the reduction of the messages to a single place in the place it is used. * Fix variable name
* commit 'bfaee410c502a95076a6bd89721c76ca08e15f7b': (39 commits) Publish Prepare for 1.0.11 release (facebook#2924) Update dev deps (facebook#2923) Update README.md Use env variable to disable source maps (facebook#2818) Make formatWebpackMessages return all messages (facebook#2834) Adjust the `checkIfOnline` check if in a corporate proxy environment (facebook#2884) Fix the order of arguments in spawned child proc (facebook#2913) Feature/webpack 3 4 (facebook#2875) Allow importing package.json (facebook#2468) Re-enable flowtype warning (facebook#2718) Format UglifyJs error (facebook#2650) Unstage yarn.lock pre-commit (facebook#2700) Update README.md Update README.md Add Electrode to alternatives (facebook#2728) Fix parsing HTML/JSX tags to real elements (facebook#2796) Update webpack version note (facebook#2798) Use modern syntax feature (facebook#2873) Allow use of scoped packages with a pinned version (facebook#2853) ... # Conflicts: # packages/react-scripts/config/webpack.config.dev.js # packages/react-scripts/config/webpack.config.prod.js # packages/react-scripts/package.json
…react-app * 'master' of https://github.com/facebookincubator/create-react-app: (36 commits) Publish Changelog for 1.0.12 (facebook#3016) Relax React dep requirements Default Favicon lossless optimisation (facebook#2917) update babel-runtime dependency in react-error-overlay and react-scripts (facebook#2991) Convert react-error-overlay to React (facebook#2515) Bump react-dev-utils Fix module function name in error overlay (facebook#3012) Docs: debugging in WebStorm (facebook#2986) Fix docs for `printFileSizesAfterBuild` (facebook#2942) Remove Modulus from user guide (facebook#2948) Remove superfluous lodash usage (facebook#2938) Update README.md (facebook#2927) Publish Prepare for 1.0.11 release (facebook#2924) Update dev deps (facebook#2923) Update README.md Use env variable to disable source maps (facebook#2818) Make formatWebpackMessages return all messages (facebook#2834) Adjust the `checkIfOnline` check if in a corporate proxy environment (facebook#2884) ...
* Move the reduction of the messages to a single place in the place it is used. * Fix variable name
* Move the reduction of the messages to a single place in the place it is used. * Fix variable name
* Move the reduction of the messages to a single place in the place it is used. * Fix variable name
Hi,
I propose this change to
formatWebpackMessages
that currently removes all errors but one to the places in which it is used.I propose this change because it's really surprising that when you call a function that is supposed to format messages that actually formats and removes messages.
I moved the removal of messages where they're displayed. That makes it clearer why you see only one single error and not all the errors that occured.